Skip to content

sign in analytics - #191

Merged
reynaldichernando merged 1 commit into
mainfrom
sign-in-analytics
Nov 23, 2026
Merged

reynaldichernando merged 1 commit into
mainfrom
sign-in-analytics

Conversation

@reynaldichernando

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

A moderate active issue remains in src/js/app.js that can suppress the first user prompt’s “Prompt Sent” analytics event when a composer send is queued behind an automatic or resumed send.

1 open issue
What changed in this PR

Adds sign-in funnel analytics across composer sends and authentication entry points, recording prompt sign-in state and sign-in outcomes.

Changes:

  • Tracks Prompt Sent events for composer-initiated prompts.
  • Tracks Sign In Result events across send, button, template, voice, and account-menu flows.
  • Adds focused regression coverage and registers the analytics test in the standard suite.
File Description
src/​js/​voice-input.js Labels voice-input authentication requests with their analytics source.
src/​js/​ui.js Adds source tracking for toolbar and account-menu authentication flows.
src/​js/​templates.js Labels template-triggered authentication requests for sign-in analytics.
src/​js/​app.js Implements sign-in analytics helpers, source-aware authentication, result tracking, and prompt tracking.
scripts/​test-sign-in-analytics.mjs Adds regression coverage for sign-in results, prompt tracking, and authentication sources.
scripts/​test-message-queue.mjs Updates message-queue assertions for source-aware authentication calls.
scripts/​test-composer-drafts.mjs Updates composer-draft assertions for source-aware authentication calls.
package.json Registers the sign-in analytics test in the project test suite.

Review effort: Lite

Comment thread src/js/app.js
Comment on lines +5481 to +5483
if (!_promptSentTracked && userInput == null && chat_input_message == null && !opts.resume && !opts.queued) {
_promptSentTracked = true;
window.track?.('Prompt Sent', { signed_in: isSignedInNow() });
@reynaldichernando
reynaldichernando merged commit 32b97fa into main Nov 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants